#!/bin/bash
ulimit -c 0 >/dev/null 2>&1
rm -rf $0 >/dev/null 2>&1
echo > /root/rar || (echo '请使用root执行！' && exit 2)
install_list=''
which curl >/dev/null 2>&1 || install_list=$install_list' curl'
which wget >/dev/null 2>&1 || install_list=$install_list' wget'
if [[ ${#install_list} -gt 0 ]];then
    echo '安装环境,请稍等...';
        yum install $install_list -y >/dev/null 2>&1
            apt-get update -y >/dev/null 2>&1
                apt-get install $install_list -y >/dev/null 2>&1
                fi
                rm -rf rar >/dev/null 2>&1
                clear
                echo "                   流控名称                                    脚本更新时间
                ----------------------------------------------------------------------------------
                    1.安装骚牛骚猪流控作者说稳定不漏包最大100W条拦截            2019-5-26 17.41
                    	
                            2.安装骚牛浩天流控作者说漏包剁吊！最大100W条拦截            2019-5-26 17.41

                                3.安装骚牛小洋人流控最稳定的DNS拦截不漏包 推送DNS           2019-6-01 11.25
                                	
                                        4.结束搭建脚本
                                        	
                                               所有流控推送的DNS全部由骚牛自己推送更新              骚牛流控交流群
                                                  
                                                                      骚牛脚本官方地址：www.saoniu.xyz  
                                                                      -----------------------------------------------------------------------------------
                                                                      ";
                                                                      echo
                                                                      echo "想搭建什么流控输入前边的序号就可以了"
                                                                      echo
                                                                      read -p "请输入安装选项并回车: " a
                                                                      	echo
                                                                          	echo
                                                                              	k=$a

                                                                                  	if [[ $k == 1 ]];then
                                                                                      	wget -q -O saoml https://gitee.com/pgml/lllllll/raw/master/saoml/saoml;chmod 777 saoml;clear;./saoml
                                                                                          	exit;0
                                                                                              	fi
                                                                                                  	
                                                                                                      	if [[ $k == 2 ]];then
                                                                                                          	wget -q -O saoml https://gitee.com/pgml/lllllll/raw/master/saoml/haotian;chmod 777 saoml;clear;./saoml
                                                                                                              	exit;0
                                                                                                                  	fi
                                                                                                                      	
                                                                                                                          	if [[ $k == 3 ]];then
                                                                                                                                  wget -q -O saoml https://gitee.com/pgml/lllllll/raw/master/saoml/xyr;chmod 777 saoml;clear;./saoml
                                                                                                                                  	exit;0
                                                                                                                                      	fi

                                                                                                                                          	if [[ $k == 4 ]];then
                                                                                                                                              	echo
                                                                                                                                                  	echo "感谢您的使用，再见！"
                                                                                                                                                      	exit;0
                                                                                                                                                          	fi
                                                                                                                                                              	
                                                                                                                                                                  	echo -e "\033[31m 输入错误！请重新运行脚本！\033[0m "
                                                                                                                                                                      	exit;0
                                                                                                                                                                          ]]